/* 用户管理接口 */
/* 根据用户id查询可以管理的用户列表 */
export const userList = (data) => {
  if (data.type == 3) {
    return axios({
      url: `/rbac/user/list?page=${data.page}&size=${data.size}&type=${data.type}`,
      method: 'get'
    })
  } else if(data.type == 1) {
    return axios({
      url: `/rbac/user/list?page=${data.page}&size=${data.size}&type=${data.type}&name=${data.name}&userName=${data.userName}`,
      method: 'get'
    })
  }else{
    return axios({
      url: `/rbac/user/list?page=${data.page}&size=${data.size}&type=${data.type}&name=${data.name}&userName=${data.userName}&status=${data.status}&userType=${data.userType}`,
      method: 'get'
    })
  }
}
/* 值集下拉框 */
export const comboBoxData = (data) => {
  return axios({
    url: `/base/dict/comboBoxData/${data}`,
    method: 'get',
  })
}
/* 密码修改 */
export const revisePassWord = (data) => {
  return axios({
    url: `rbac/user/reset/?id=${data}`,
    method: 'post'
  })
}
/* 新增或修改用户 */
export const addOrEditUser = (data) => {
  return axios({
    url: '/rbac/user',
    method: 'put',
    data
  })
}
